norm_2_complex Function

public function norm_2_complex(a) result(result)

function that calculates the Euclidean norm (L2 norm or modulus) of a vector , where where is the dimension of the complex vector .

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), DIMENSION(:) :: a

Return Value real(kind=dp)


Called by

proc~~norm_2_complex~~CalledByGraph proc~norm_2_complex norm_2_complex proc~normalise_complexe normalise_complexe proc~normalise_complexe->proc~norm_2_complex

Source Code

    FUNCTION norm_2_complex(a) RESULT(result)

        COMPLEX(dp), DIMENSION(:) :: a
        REAL(dp) :: result

        result = SQRT(REAL(DOT_PRODUCT(a, CONJG(a))))
    
    END FUNCTION norm_2_complex